1. Field
Embodiments of the invention relate to the field of transactional memory and transactional execution. More particularly, embodiments of the invention relate to enabling transactional memory execution utilizing virtual memory with and without hardware support.
2. Description of Related Art
Transactional memory execution allows applications, programs, modules, etc., and more particularly, application program interfaces (APIs), to access a database file or another type of memory file in an atomic manner. For example, transactional memory may be used a part of a run-time engine for managing persistent, pointer-rich data structures, such as databases, and directory services.
An API may be thought of as a language or message format used by an application, program, module, etc., to communicate with a system program such as an operating system or a database management system (DBMS). APIs may be implemented by writing function calls in a program, which provide the linkage to a specific sub-routine for execution.
Transactional memory makes it easier to write parallel programs and the use of transactional memory allows for different threads to be processed simultaneously thereby gaining extremely high processing efficiencies.
Transactional memory is typically thought of as being derived from database transactions. Generally, a transaction is a group of operations that must satisfy four properties referred to as ACID properties (atomicity, consistency, isolation, and durability). The first ACID property is atomicity. Atomicity requires that a transaction is performed in all-or-nothing manner. The transaction may be aborted either because the program aborts or due to an error. Atomicity requires that either all of the operations of the transaction be performed or none of them be performed. The second ACID property is consistency. Consistency requires that if the database is in a consistent state before the transaction is performed, the database should be left in a consistent state. The third ACID property is isolation. The isolation property states that all transactions performed have to appear to be done in some sort of serial order (i.e. they should be serializable). The last and fourth property required to be under ACID is durability. Durability requires a transaction to survive a machine crash. That is, a transaction has to be written to a stable storage device (e.g. a disk) before it can be committed.
Transactional memory and transactional execution allow a multi-threaded application to be written in a robust and high-performance manner. This becomes more important as computer systems, such as desktops and servers, are increasingly being required to operate in heavily-threaded environments. Particularly, the speculative execution support of modern processors can be utilized to execute blocks of code speculatively to implement these multi-threaded applications efficiently. However, present techniques that implement transactional memory and transactional execution suffer from resource limitations in that they cannot handle arbitrary sized transactions or transactions of arbitrary lengths thereby placing tremendous constraints on both programming and transactional execution.